<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>父元素相对，子元素绝对</title>
		<style type="text/css">
			#mainContent{
				height: 9000px;
				width: 4000px;
				border: 4px solid gold;
				position: relative;
			}
			#mainContent #adv{
				height: 100px;
				width: 100px;
				background-color: #00FFFF;
				position: absolute;
				right: 0;
				bottom: 0;
			}
			#talk{
				height: 120px;
				width: 120px;
				overflow: hidden;
				position: fixed;
				left: 10px;
				top: 50%;
			}
		</style>
	</head>
	<body>
		<div id="nav" style="height: 140px; background-color: #00FFFF;"></div>
		<div id="mainContent">
			<!--在右下角-->
			<div id="adv">广告</div>
		</div>
		<div id="talk">
			<img src="../images/baby_3.jpg"/>
		</div>
	</body>
</html>
